package demo.standard;

public class ConcreteFlyWeight implements IFlyWeight {

    private String intrinsicState;

    public ConcreteFlyWeight(String intrinsicState) {
        System.out.println("创建共享对象,内部状态:" + intrinsicState);
        this.intrinsicState = intrinsicState;
    }

    @Override
    public void use(String extrinsicState) {
        System.out.println("使用共享对象,内部状态:" + intrinsicState + ",外部状态" + extrinsicState);
    }
}
